<?php
global $references;
$references = array(

    "unitOfWork" => array(
        "class" => "Pageley_Mapper_Gateway",
        "constructor" => array(
            "gateway" => "#{gateway}"
        )
    ),

    "requestDispatcher" => array(
        "class" => "Pageley_Controller_Dispatcher_Basic",
        "properties" => array(
            "controllers" => array(
                "Commerce/ListCategories" => "#{controller.commerce.listCategories}",
                "Commerce/GetCategory" => "#{controller.commerce.getCategory}",
                "Commerce/ListMostRecentArticles" => "#{controller.commerce.listMostRecentArticles}",
                "Commerce/AddItemToOrder" => "#{controller.commerce.addItemToOrder}",
                "Commerce/RemoveItemsFromOrder" => "#{controller.commerce.removeItemsFromOrder}",
                "Commerce/Admin/ListPlacedOrders" => "#{controller.commerce.listPlacedOrders}",
                "Commerce/PlaceOrder" => "#{controller.commerce.placeOrder}",
                "Commerce/AddInfoToOrder" => "#{controller.commerce.addInfoToOrder}",
                "Commerce/CancelOrder" => "#{controller.commerce.cancelOrder}",
                "Commerce/LogInCustomer" => "#{controller.commerce.logInCustomer}",
                "Commerce/LogOutCustomer" => "#{controller.commerce.logOutCustomer}",
                "Commerce/RegisterCustomer" => "#{controller.commerce.registerCustomer}",
                "Query" => "#{controller.query}",
                "Find" => "#{controller.find}",
                "Delete" => "#{controller.delete}",
                "Save" => "#{controller.save}"
            )
        )
    ),

    "controller.commerce.listCategories" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "listCategories"
            ),
            "commandClassName" => "Pageley_Commerce_Command_ListCategories",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.getCategory" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "catalog"
            ),
            "commandClassName" => "Pageley_Commerce_Command_GetCategory",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.listMostRecentArticles" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "listArticlesForCategory"
            ),
            "commandClassName" => "Pageley_Commerce_Command_ListMostRecentArticles",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.addItemToOrder" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "addItemToOrder"
            ),
            "commandClassName" => "Pageley_Commerce_Command_AddItemToOrder",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.removeItemsFromOrder" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "removeItemsFromOrder"
            ),
            "commandClassName" => "Pageley_Commerce_Command_RemoveItemsFromOrder",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.addInfoToOrder" => array(
        "class" => "Pageley_Controller_Dynamic",
        "constructor" => array(
            "views" => array(
                "success" => "addInfoToOrder"
            ),
            "commandClassName" => "Pageley_Commerce_Command_AddInfoToOrder",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.listPlacedOrders" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "listPlacedOrders"
            ),
            "commandClassName" => "Pageley_Commerce_Command_ListPlacedOrders",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.placeOrder" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "placeOrder"
            ),
            "commandClassName" => "Pageley_Commerce_Command_PlaceOrder",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.cancelOrder" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "cancelOrder"
            ),
            "commandClassName" => "Pageley_Commerce_Command_CancelOrder",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.logInCustomer" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "logInCustomer"
            ),
            "commandClassName" => "Pageley_Commerce_Command_LogInCustomer",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.logOutCustomer" => array(
        "class" => "Pageley_Controller_Form",
        "constructor" => array(
            "views" => array(
                "success" => "logOutCustomer"
            ),
            "commandClassName" => "Pageley_Commerce_Command_LogOutCustomer",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "controller.commerce.registerCustomer" => array(
        "class" => "Pageley_Controller_Dynamic",
        "constructor" => array(
            "views" => array(
                "success" => "registerCustomer"
            ),
            "commandClassName" => "Pageley_Commerce_Command_RegisterCustomer",
            "unitOfWork" => "#{unitOfWork}"
        )
    )

);